﻿using System;
using System.Collections.Generic;
using visinia.SmartEngine;
using visinia.SmartEngine.Modules;

public partial class Admin_Controls_AdminBar : AdminBar
{
    private List<ModuleInfo> OrphanModules = null;

    protected void Page_Load(object sender, EventArgs e)
    {
        WebPageController.AddAdminThemeAwareCssLink(Page, "admin-bar.css");
        ToolBox.OrphanModules = OrphanModules;
        CurrentPageId.Value = Request.QueryString["PageId"];
    }

    public override void DataBindOrphanModules(System.Collections.Generic.List<ModuleInfo> modules)
    {
        OrphanModules = modules;
    }

    public string UserModeCommand()
    {
        return WebRoots.GetWebRoot + "Default.aspx?PageId=" + Request.QueryString["PageId"];
    }
        
    public string QuickPreview()
    {
        return WebRoots.GetWebRoot + "Default.aspx?PageId=" + Request.QueryString["PageId"];
    }
}
